<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<navBar name="newBar组件" :content="data" @changeContent="changeContent">
			<!--给子组件传带结构的数据，在子组件中采用插槽slot的方式接收-->
			<view>我是插槽的内容</view>
		</navBar>
	</view>
</template>

<script setup>
	import {ref } from 'vue'
 let title = ref("医院陪诊");
 let data = ref("动态属性")
 
 let changeContent = (val) => {
	 //注意用ref的，赋值 需要加个.value
	 data.value = val
 }
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
